import re

html = '''
    <div id="1544192971" class="doulist-item">
    <div class="mod">
      
  <div class="hd">
  </div>

      
  
  

  <div class="bd doulist-subject">
      
        <div class="doulist-video-items">
          <span class="title">播放全片</span>
            
            <a class="doulist-video-item" target="_blank" href="douban://douban.com/goToWXMiniProgram?path=preload_play/play/index?cid=mzc00200xijig1f&amp;type=0&amp;id=gh_fce17bb0518f&amp;ptag=douban"><span class="icon-circle"><img src="https://img3.doubanio.com/cuphead/movie-static/pics/video-qq.png"></span> 腾讯视频</a>

            
            <a class="doulist-video-item" target="_blank" href="https://m.bilibili.com/bangumi/play/ss46023?bsource=doubanh5"><span class="icon-circle"><img src="https://img9.doubanio.com/cuphead/movie-static/pics/video-bilibili.png"></span> 哔哩哔哩</a>

            
            <a class="doulist-video-item" target="_blank" href="http://v.youku.com/v_show/id_XNjM4MTI3MTYyOA==.html?tpa=dW5pb25faWQ9MzAwMDA4XzEwMDAwMl8wMl8wMQ&amp;refer=esfhz_operation.xuka.xj_00003036_000000_FNZfau_19010900"><span class="icon-circle"><img src="https://img3.doubanio.com/cuphead/movie-static/pics/video-youku.png"></span> 优酷视频</a>

        </div>

    




    <div class="source">
      来自：豆瓣电影
    </div>
    
    <div class="post">
      <a href="https://movie.douban.com/subject/1293350/" target="_blank">
        <img src="https://img1.doubanio.com/view/photo/s_ratio_poster/public/p792443418.webp">
      </a>
    </div>
    <div class="title">
      <a href="https://movie.douban.com/subject/1293350/" target="_blank">
          <img style="width: 16px; vertical-align: text-top;" src="https://img1.doubanio.com/f/sns/5741f726dfb46d89eb500ed038833582c9c9dcdb/pics/sns/doulist/ic_play_web@2x.png">
        两杆大烟枪 Lock, Stock and Two Smoking Barrels
      </a>
    </div>
    
      <div class="rating">
          <span class="allstar45"></span>
          <span class="rating_nums">9.1</span>
          <span>(653834人评价)</span>
      </div>
    <div class="abstract">
      
          导演: 盖·里奇
            <br>
          主演: 杰森·弗莱明 / 德克斯特·弗莱彻 / 尼克·莫兰
            <br>
          类型: 剧情 / 喜剧 / 犯罪
            <br>
          制片国家/地区: 英国
            <br>
          年份: 1998
    </div>
  </div>
  


        
  
  <div class="ft">

    <div class="actions">
      <time class="time">2024-07-22 14:29:36</time>
        <a href="javascript: void 0;" class="btn btn-like j a_show_login" data-action-type="like">赞</a>

      <a href="javascript: void 0;" class="btn btn-action-reply" data-action-type="showComments" data-count="0">回复</a>

    </div>

    <div class="others">
      <div class="comments">
        <div class="comments-items"></div>
        <a href="javascript:void(0);" class="btn" data-action-type="showComments" style="display: none;">加载更多</a>
          <span class="pl" align="right"><a class="j a_show_login" href="https://www.douban.com/accounts/register?reason=comment">&gt; 我来回复</a></span>
      </div>
    </div>
  </div>

  <link rel="stylesheet" href="https://img1.doubanio.com/f/vendors/e8a7261937da62636d22ca4c579efc4a4d759b1b/css/ui/dialog.css">
  <link rel="stylesheet" href="https://img1.doubanio.com/f/vendors/711f22c7157a02a5bdbea90f346551312413d4ed/css/report_dialog.css">
  <script src="https://img1.doubanio.com/f/vendors/b57325609c1253bbb2791af141d92cc0a71acde5/js/lib/tagsug.js"></script>
  

  

    </div>
  </div>
'''


# 2. 正则表达式
regex = '<img style=".*?">(.*?)</a>.*?<span class="rating_nums">(.*?)</span>.*?<span>(.*?)</span>'
pattern = re.compile(regex,re.S)

r_list = pattern.findall(html)
print(r_list)
for item in r_list:
    print(item)


'''
          <img style=".*?">(.*?)</a>.*?<span class="rating_nums">(.*?)</span>
          .*?
          <span>(.*?)</span>
      </div>
    <div class="abstract">
      
          (.*?)
    </div>
  </div>
  


        
  
  
'''